//## begin module%380FD39C01D0.cm preserve=yes
//	NB! Change this section to "preserve=yes" before
//	codegenerating files which already got a version log.
//	$Log: /Casa/Source/TechnicalPlatformLayer/Type/CasaException.h $
//     
//     8     11/15/99 12:04p Sen
//     Rose model change to produce inline code. CPP file no longer needed.
//     
//     7     11/16/99 6:23p Zli
//     
//     5     22-10-99 5:23 Sen
//     Sorry previous version was wrong !!!!
//     1 - Changed ROSE model, so all common exception are now located in this
//     one file.
//     2 - Introduced IllegalStateException.
//     
//     4     22-10-99 5:10 Sen
//     1 - Changed ROSE model, so all common exception are now located in this
//     one file.
//     2 - Introduced IllegalStateException.
//     
//     3     1-10-99 13:40 Pep
//     
//     2     7/02/99 1:43p Bk
//     
//     1     5/28/99 3:57p Plj
//     Frst draft of the exception tree
//## end module%380FD39C01D0.cm

//## begin module%380FD39C01D0.cp preserve=yes
//	Copyright 1999 Analogic Corporation
//	1. Programmer: 
//	2. Programmer: Svend Erik Nissen
//	Date: DD/MM/1999
//## end module%380FD39C01D0.cp

//## Module: BaseException%380FD39C01D0; Subprogram specification
//## Subsystem: TechnicalPlatformLayer::Type%364A111501DE
//## Source file: C:\Casa\Source\TechnicalPlatformLayer\Type\CasaException.h

#ifndef BaseException_h
#define BaseException_h 1

//## begin module%380FD39C01D0.additionalIncludes preserve=no
//## end module%380FD39C01D0.additionalIncludes

//## begin module%380FD39C01D0.includes preserve=yes
#include "StdAfx.h"
//## end module%380FD39C01D0.includes

//## begin module%380FD39C01D0.declarations preserve=no
//## end module%380FD39C01D0.declarations

//## begin module%380FD39C01D0.additionalDeclarations preserve=yes
#define THROW_BASE_EXCEPTION( ThisExceptionClass, ThisDescription ) \
							{ThisExceptionClass ThisException; \
							ThisException.m_sFileName=__FILE__; \
							ThisException.m_nLineNumber=__LINE__; \
							ThisException.m_strDescription=ThisDescription; \
							throw ThisException;}
//## end module%380FD39C01D0.additionalDeclarations


//## begin BaseException%37A15E31015B.preface preserve=yes
//## end BaseException%37A15E31015B.preface

//## Class: BaseException%37A15E31015B
//	This is the base exception for the main software. All
//	exceptions should be derived from this exception class.
//	Each package which generates non fatal exceptions should
//	have its own exception base class. e.g. CShotControl
//	Exception.
//## Category: TechnicalPlatformLayer::Type::Exceptions%37A15DE70118
//## Subsystem: TechnicalPlatformLayer::Type%364A111501DE
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class BaseException 
{
  //## begin BaseException%37A15E31015B.initialDeclarations preserve=yes
  //## end BaseException%37A15E31015B.initialDeclarations

  public:

    //## Other Operations (specified)
      //## Operation: SetDescription%940355845
      //	Writes new description of exception.
      void SetDescription (const CString& strDescription);

      //## Operation: GetDescription%940355846
      //	Retrieves description of exception.
      CString GetDescription () const;

    // Data Members for Class Attributes

      //## Attribute: m_strDescription%37A15EAF01A2
      //	Description of exception being thrown. The text is for
      //	use in the USL logging application if the exception is
      //	not caught before the exception reaches the outer level.
      //## begin BaseException::m_strDescription%37A15EAF01A2.attr preserve=no  public: CString {UA} ""
      CString m_strDescription;
      //## end BaseException::m_strDescription%37A15EAF01A2.attr

      //## Attribute: m_sFileName%380FD9DE0043
      //## begin BaseException::m_sFileName%380FD9DE0043.attr preserve=no  public: char* {UA} initval
      char* m_sFileName;
      //## end BaseException::m_sFileName%380FD9DE0043.attr

      //## Attribute: m_nLineNumber%380FDA1B0358
      //## begin BaseException::m_nLineNumber%380FDA1B0358.attr preserve=no  public: int {UA} 
      int m_nLineNumber;
      //## end BaseException::m_nLineNumber%380FDA1B0358.attr

    // Additional Public Declarations
      //## begin BaseException%37A15E31015B.public preserve=yes
      //## end BaseException%37A15E31015B.public

  protected:
    // Additional Protected Declarations
      //## begin BaseException%37A15E31015B.protected preserve=yes
      //## end BaseException%37A15E31015B.protected

  private:
    // Additional Private Declarations
      //## begin BaseException%37A15E31015B.private preserve=yes
      //## end BaseException%37A15E31015B.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin BaseException%37A15E31015B.implementation preserve=yes
      //## end BaseException%37A15E31015B.implementation
};

//## begin BaseException%37A15E31015B.postscript preserve=yes
//## end BaseException%37A15E31015B.postscript

//## begin IllegalStateException%380FD496008F.preface preserve=yes
//## end IllegalStateException%380FD496008F.preface

//## Class: IllegalStateException%380FD496008F
//## Category: TechnicalPlatformLayer::Type::Exceptions%37A15DE70118
//## Subsystem: TechnicalPlatformLayer::Type%364A111501DE
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class IllegalStateException : public BaseException  //## Inherits: <unnamed>%380FD4B00368
{
  //## begin IllegalStateException%380FD496008F.initialDeclarations preserve=yes
  //## end IllegalStateException%380FD496008F.initialDeclarations

  public:
    // Additional Public Declarations
      //## begin IllegalStateException%380FD496008F.public preserve=yes
      //## end IllegalStateException%380FD496008F.public

  protected:
    // Additional Protected Declarations
      //## begin IllegalStateException%380FD496008F.protected preserve=yes
      //## end IllegalStateException%380FD496008F.protected

  private:
    // Additional Private Declarations
      //## begin IllegalStateException%380FD496008F.private preserve=yes
      //## end IllegalStateException%380FD496008F.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin IllegalStateException%380FD496008F.implementation preserve=yes
      //## end IllegalStateException%380FD496008F.implementation
};

//## begin IllegalStateException%380FD496008F.postscript preserve=yes
//## end IllegalStateException%380FD496008F.postscript

// Class BaseException 


//## Other Operations (inline)
inline void BaseException::SetDescription (const CString& strDescription)
{
  m_strDescription = strDescription;

  //## begin BaseException::SetDescription%940355845.body preserve=yes
  //## end BaseException::SetDescription%940355845.body
}

inline CString BaseException::GetDescription () const
{
  //## begin BaseException::GetDescription%940355846.body preserve=yes
  //## end BaseException::GetDescription%940355846.body

  return m_strDescription;
}

// Class IllegalStateException 

//## begin module%380FD39C01D0.epilog preserve=yes
//## end module%380FD39C01D0.epilog


#endif
